<{include file="../modules/_manager/header.html" title='Cs2 管理トップページ '}>
<script src="<{$ROOTPATH}>/_manager/scripts/vars/default.js.php"></script>
<script> jQuery(function($){_default.init();}); </script>
<div class="block">
<h1>CS2在庫管理システム</h1>
<h2>トップページ</h2>

<div class="main">
	<{*--资金统计 start--*}>
	<{if $login_levelno gt 84}>
	<div class="viewblock">
		<table>
			<tr>
				<td class="title">資金残高明細</td>
			</tr>
			<tr>
				<td style="width:48%" valign="top">
					<table>
						<tbody>
						<{$SUMPLUS = 0}>
				    	<{foreach $sum_bank as $entry}>
			    			<tr>
			    				<td colspan="6" class="lab">
			    					<{$entry.bank}> <{$entry.branch}> <{$entry.bankno}> <{$entry.name}>
			    				</td>
			    			</tr>
			    			<tr>
			    				<td>入金：</td>
			    				<td class="typeMoney"><{$entry.accountin}></td>
			    				<td>出金：</td>
			    				<td class="typeMoney"><{$entry.accountout}></td>
			    				<td>残高：</td>
			    				<td class="typeMoney"><{$entry.accountin-$entry.accountout}></td>
			    			</tr>
							<{$SUMPLUS=$SUMPLUS+($entry.accountin-$entry.accountout)}>
						<{/foreach}>
						</tbody>
						<tfoot>
						<tr>
							<td colspan="4">総残高:</td>
					        <td colspan="2" class="typeMoney"><{$SUMPLUS}></td>
				        </tr>
				        </tfoot>
				   	</table>
			   	</td>
		</tr>
		<tr><td class="title">2011年～2012年の月間売上一覧表</td></tr>
		<tr>
				<td valign="top">
					<table>
						<tbody>
							<tr>
								<td class="lab" rowspan="2">月統計</td>
								<td class="lab">運営金</td>
								<td class="lab">送料</td>
								<td class="lab">給料</td>
								<td class="lab">返金</td>
								<td class="lab" rowspan="2">売上額</td>
							</tr>
							<tr>
								<td class="lab">運営金%</td>
								<td class="lab">送料%</td>
								<td class="lab">給料%</td>
								<td class="lab">返金%</td>
							</tr>
							<{$SUMYEAR1 = 0}>
							<{$SUMYEAR11 = 0}>
							<{$SUMYEAR2 = 0}>
							<{$SUMYEAR3 = 0}>
							<{$SUMYEAR6 = 0}>
							<{foreach $sum_bank_by_dates as $entry}>
							<tr>
								<td rowspan="3"><{$entry.dyear}>-<{$entry.dmonth}></td>
								<td class="typeMoney"><{$entry.account11}></td>
								<td class="typeMoney"><{$entry.account2}></td>
								<td class="typeMoney"><{$entry.account6}></td>
								<td class="typeMoney"><{$entry.account3}></td>
								<td class="typeMoney" rowspan="2"><{$entry.account1}></td>
							</tr>
							<tr>
								<td style="text-align:right;"><{math equation="(x/y)*100" x=$entry.account11 y=$entry.account1 format="%.2f"}>%</td>
								<td style="text-align:right;"><{math equation="(x/y)*100" x=$entry.account2 y=$entry.account1 format="%.2f"}>%</td>
								<td style="text-align:right;"><{math equation="(x/y)*100" x=$entry.account6 y=$entry.account1 format="%.2f"}>%</td>
								<td style="text-align:right;"><{math equation="(x/y)*100" x=$entry.account3 y=$entry.account1 format="%.2f"}>%</td>
							</tr>
							<{$SUMYEAR1 = $SUMYEAR1+$entry.account1}>
							<{$SUMYEAR11 = $SUMYEAR11+$entry.account11}>
							<{$SUMYEAR2 = $SUMYEAR2+$entry.account2}>
							<{$SUMYEAR3 = $SUMYEAR3+$entry.account3}>
							<{$SUMYEAR6 = $SUMYEAR6+$entry.account6}>
							<tr>
								<td colspan="5">総支出額は<span class="typeMoney"><{$entry.account11+$entry.account2+$entry.account6+$entry.account3}></span>
								約売上額の
								<{math equation="(x/y)*100" x=$entry.account11+$entry.account2+$entry.account6+$entry.account3 y=$entry.account1 format="%.2f"}>%です。
								</td>
							</tr>
							<{/foreach}>
						</tbody>
						<tfoot>
						<tr>
							<td rowspan="3">総額:</td>
							<td class="typeMoney"><{$SUMYEAR11}></td>
							<td class="typeMoney"><{$SUMYEAR2}></td>
							<td class="typeMoney"><{$SUMYEAR6}></td>
							<td class="typeMoney"><{$SUMYEAR3}></td>
					        <td rowspan="2" class="typeMoney"><{$SUMYEAR1}></td>
				        </tr>
				        <tr>
							<td style="text-align:right;"><{math equation="(x/y)*100" x=$SUMYEAR11 y=$SUMYEAR1 format="%.2f"}>%</td>
							<td style="text-align:right;"><{math equation="(x/y)*100" x=$SUMYEAR2 y=$SUMYEAR1 format="%.2f"}>%</td>
							<td style="text-align:right;"><{math equation="(x/y)*100" x=$SUMYEAR6 y=$SUMYEAR1 format="%.2f"}>%</td>
							<td style="text-align:right;"><{math equation="(x/y)*100" x=$SUMYEAR3 y=$SUMYEAR1 format="%.2f"}>%</td>
				        </tr>
				        <tr>
							<td colspan="5">総支出額は<span class="typeMoney"><{$SUMYEAR11+$SUMYEAR2+$SUMYEAR6+$SUMYEAR3}></span>
							約売上額の
							<{math equation="(x/y)*100" x=$SUMYEAR11+$SUMYEAR2+$SUMYEAR6+$SUMYEAR3 y=$SUMYEAR1 format="%.2f"}>%です。
							</td>
						</tr>
				        </tfoot>
					</table>
				</td>
			</tr>
		</table>
	</div>
	<{/if}>
	<{*--资金统计 end--*}>
</div>

</div>
<{include file="../modules/_manager/footer.html"}>